{extend name="template/base" /}
{block name="style"}
<!--select2样式 start -->
<link href="__LIB__/select2-4.0.3/dist/css/select2.min.css" rel="stylesheet" />
<!--select2样式 end -->
{/block}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="group_id" value="{$group_id}">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">分组：</label>
            <div class="formControls col-xs-6 col-sm-6">
                {$group_id}
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">司机名字：</label>
            <div class="formControls col-xs-6 col-sm-6">
                {$driverUserInfo.realname}
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">司机手机号码：</label>
            <div class="formControls col-xs-6 col-sm-6">
                {$driverUserInfo.mobile}
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">申请中止原因：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea name="rejection_reason" cols="" rows="" class="textarea"  placeholder="请输入不小于10个字的申请中止的原因" nullmsg="备注不能为空！"></textarea>
                <p class="textarea-numberbar"></p>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">中止金额：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="munber" name="dir_price" class="input-text" value="0" placeholder="请填写司机费用" oninput = "value=value.replace(/[^\d]/g,'')" />
                <p class="textarea-numberbar"></p>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <div id="content"></div>
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<!--时间插件-->
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="__LIB__/template/template.js"></script>
<!--select2 js 插件-->
<script type="text/javascript" src="__LIB__/select2-4.0.3/dist/js/select2.min.js"></script>
<script>
    function add(){
        var in_undistributed={$vo['dispatch_group_status']=='undistributed'?1:0};
        var is_new={$vo?0:1};
        if(!in_undistributed&&!is_new){
            layer.msg("该状态下不可更改", {
                time: 2000, //2s后自动关闭
            });
            return ;
        }

        var index=layer.open({
            type: 2,
            area: ['700px', '450px'],
            fixed: false, //不固定
            maxmin: true,
            content: '/admin/dispatch_traveler_group/traveler?'+$("input[name='traveler[id][]']").serialize()
        });
        layer.full(index);
    }
    function deltd(ele){
        var in_undistributed={$vo['dispatch_group_status']=='undistributed'?1:0};
        var is_new={$vo?0:1};
        if(!in_undistributed&&!is_new){
            layer.msg("该状态下不可更改", {
                time: 2000, //2s后自动关闭
            });
            return ;
        }
        $(ele).parent().parent().remove();
    }

    $(function () {

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        //车型select2 js部分 start
        var car_type_id = $("#car_type_id").select2({
            language: "zh-CN", //设置 提示语言
            width: "100%", //设置下拉框的宽度
            theme: "classic"
        });
        {notempty name = "vo['car_type_id']"}
        car_type_id.val("{$vo['car_type_id']}").trigger("change");
        {/notempty}
            //车型select2 js部分 end

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}
